﻿using System;
using UnityEngine;

// Token: 0x02000271 RID: 625
public class SkeletonEditTransformHandle : MonoBehaviour
{
	// Token: 0x1700019D RID: 413
	// (get) Token: 0x06000DE2 RID: 3554 RVA: 0x0006CEF2 File Offset: 0x0006B0F2
	public Transform TargetTransform
	{
		get
		{
			return this.targetTransform;
		}
	}

	// Token: 0x06000DE3 RID: 3555 RVA: 0x0006CEFC File Offset: 0x0006B0FC
	public void AssignTransform(Transform transform, Humanoid target)
	{
		this.target = target;
		this.targetTransform = transform;
		this.scale = 0.02f;
		if (target.isGiantess)
		{
			this.scale *= 1000f;
		}
		base.transform.SetParent(target.transform);
		this.UpdatePosition();
	}

	// Token: 0x06000DE4 RID: 3556 RVA: 0x0006CF58 File Offset: 0x0006B158
	public void UpdatePosition()
	{
		if (!this.targetTransform)
		{
			return;
		}
		base.transform.position = this.targetTransform.position;
		base.transform.localScale = Vector3.one * this.scale;
	}

	// Token: 0x06000DE5 RID: 3557 RVA: 0x0006CFA7 File Offset: 0x0006B1A7
	private void OnDisable()
	{
		this.target = null;
		this.targetTransform = null;
	}

	// Token: 0x040012CC RID: 4812
	private const float GIANTESS_SCALE_MULTIPLIER = 1000f;

	// Token: 0x040012CD RID: 4813
	private const float HANDLE_SIZE = 0.02f;

	// Token: 0x040012CE RID: 4814
	[SerializeField]
	private Transform visuals;

	// Token: 0x040012CF RID: 4815
	private Humanoid target;

	// Token: 0x040012D0 RID: 4816
	private Transform targetTransform;

	// Token: 0x040012D1 RID: 4817
	private float scale;
}
